/*
 * NamedNodeMapImpl.h
 *
 *  Created on: Apr 19, 2009
 *      Author: wrice
 */

#ifndef NAMEDNODEMAPIMPL_H_
#define NAMEDNODEMAPIMPL_H_
#include "DOMCoreImp.h"
namespace DOMCoreImp {

class NamedAttrMapImp : IMPLEMENTS( NamedAttrMap ) {
public:
	NamedAttrMapImp( ElementImp * parent );

	virtual Attr * getNamedItem(DOMString name);
	virtual Attr * setNamedItem(Attr * arg) throw(DOMExceptionPtr);
	virtual Attr * removeNamedItem(DOMString name) throw(DOMExceptionPtr);
	virtual Attr * item(unsigned long index);
	virtual unsigned long getLength();

private:
	typedef map< DOMString, Attr * > NamedAttrs;
	typedef pair< DOMString, Attr * > NamedAttrPair;
	typedef NamedAttrs::const_iterator NamedAttrsIterator;
	typedef NamedAttrs::iterator NamedAttrsModifiableIterator;
	NamedAttrs namedAttrs_;

	ElementImp * parentElementImp_;

private: // new method
	ElementImp * getParentElementImp() const;
};

}

#endif /* NAMEDNODEMAPIMPL_H_ */
